package com.service.impl;

import com.mapper.CityMapper;
import com.pojo.City;
import com.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author xu
 * @Description
 * @Date 2022.2.23
 */
@Service("CityService")
public class CityServiceImpl implements CityService {

    @Autowired
    private CityMapper cityMapper;

    @Override
    public List<City> getCity(Integer pid) {
        List<City> list = cityMapper.selectAll(pid);
        if (list!=null){
            return list;
        }
        return null;
    }

    @Override
    public City getLocation(Integer id) {
        City city = cityMapper.findAll(id);
        return null;
    }
}
